/*
 * Copyright (C) 2015 yixun All Rights Reserved.
 * 
 * CompanyDto.java
 */
package com.yixun.qfbao.model.dto;

import com.yixun.qfbao.model.Company;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

/**
 * [文件名称]<br>
 * CompanyDto.java<br>
 * <br>
 * [文件描述]<br>
 * 商户 数据辅助类<br>
 * <br>
 * [修改记录]<br>
 * 2015-12-10 14:36:24 创建 陶俊代码生成器<br>
 * 
 * @author 陶俊代码生成器
 * @version 1.00
 */
public class CompanyDto extends Company {
	private static final long serialVersionUID = 1L;
	/**
	 *需要正序字段名
	 */
	private List<String> asc;
	/**
	 *需要逆序字段名
	 */
	private List<String> desc;
	/**
	 *排序SQL
	 */
	private String orders;
	
	/**
	 *非中介公司，公司名称自定义
	 */
	private String otherCompanyName;
	
	private List<Long> notIds;
	
	//公司对应的部门ID
	private Long deptId;
	//对接人
	private Long principal;
	//操作人id(用于用户操作日志)
    private Long optUser;
    //扩展sql
    private String sql;
    
    private List<String> companyUuids;
    
    /**
     * 公司状态集合
     */
    private List<String> statusList;

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public Long getOptUser() {
		return optUser;
	}

	public void setOptUser(Long optUser) {
		this.optUser = optUser;
	}

	public Long getPrincipal() {
		return principal;
	}

	public void setPrincipal(Long principal) {
		this.principal = principal;
	}

	/**
	 *  添加需要正序字段名
	 */
	public void addAsc(String col){
		if(asc==null){
			asc = new LinkedList<String>();
		}
		asc.add(col);
	}
	
	/**
	 *  清空需要正序字段名
	 */
	public void cleanAsc(){
		asc = null;
	}
	
	/**
	 *  添加需要逆序字段名
	 */
	public void addDesc(String col){
		if(desc==null){
			desc = new LinkedList<String>();
		}
		desc.add(col);
	}
	
	/**
	 *  清空需要逆序字段名
	 */
	public void cleanDesc(){
		desc = null;
	}
	
	
	/**
	 *  如果排序SQL为空根据需要正逆序的字段名拼接排序SQL
	 */
	public String  getOrders() {
		StringBuilder orderStr = null;
		StringBuilder ascStr;
		StringBuilder descStr;
		if(orders==null){
			if(asc!=null){
				ascStr = new StringBuilder();
				orderStr = new StringBuilder();
				String pex = "";
				for(String a : asc){
					ascStr.append(pex+a);
					pex = ",";
				}
				orderStr.append(ascStr.toString()+" ASC");
			}
			if(desc!=null){
				descStr = new StringBuilder();
				String pex = "";
				for(String d : desc){
					descStr.append(pex+d);
					pex = ",";
				}
				if(orderStr==null){
					orderStr = new StringBuilder();
					orderStr.append(descStr.toString()+" DESC");
				}else{
					orderStr.append(","+descStr.toString()+" DESC");
				}
			}
			orders = orderStr!=null?orderStr.toString():null;
		}
		
		return orders;
	}
	
	/**
	 *  设置排序SQL
	 */
	public void setOrders(String orders) {
		this.orders = orders;
	}
	private Date updateTimeBefore;
	private Date updateTimeAfter;
	private Date createTimeBefore;
	private Date createTimeAfter;

    public Date getUpdateTimeBefore() {
        return this.updateTimeBefore;
    }
    public void setUpdateTimeBefore(Date updateTimeBefore) {
        this.updateTimeBefore = updateTimeBefore;
    }

    public Date getUpdateTimeAfter() {
        return this.updateTimeAfter;
    }
    public void setUpdateTimeAfter(Date updateTimeAfter) {
        this.updateTimeAfter = updateTimeAfter;
    }
    public Date getCreateTimeBefore() {
        return this.createTimeBefore;
    }
    public void setCreateTimeBefore(Date createTimeBefore) {
        this.createTimeBefore = createTimeBefore;
    }

    public Date getCreateTimeAfter() {
        return this.createTimeAfter;
    }
    public void setCreateTimeAfter(Date createTimeAfter) {
        this.createTimeAfter = createTimeAfter;
    }

	public String getOtherCompanyName() {
		return otherCompanyName;
	}

	public void setOtherCompanyName(String otherCompanyName) {
		this.otherCompanyName = otherCompanyName;
	}

	public List<Long> getNotIds() {
		return notIds;
	}

	public void setNotIds(List<Long> notIds) {
		this.notIds = notIds;
	}

	public Long getDeptId() {
		return deptId;
	}

	public void setDeptId(Long deptId) {
		this.deptId = deptId;
	}
	/**
	 * 城市的id
	 */
	private String cityIds;
	/**
	 * 省份的ids
	 */
	private String provinceIds;
	/**
	 * 
	 * 经纪公司集合
	 */
	private List<String> staffCompanyNames;
	/**
	 * 机构佣金
	 */
	private String commission;
	/**
	 * 带看奖励
	 */
	private String reward;
	/**
	 * 使用楼盘佣金
	 * 0: 否 1: 是
	 */
	private String premisesCommission;
	/**
	 * 结佣方式
	 * 1、签约结佣 2、按揭结佣
	 */
	private String commissionWay;
	/**
	 *上级部门ID，如果为-1则为顶级部门
	 */
	private Long parentId;
	/**
	 * 域名
	 */
	private String domain;
	/**
	 * 分销商h5登录页logo
	 */
	private String h5LoginLogo;
	/**
	 * 案场助手登录页logo
	 */
	private String assiantLoginLogo;
	/**
	 * 案场助手首页logo
	 */
	private String assiantIndexLogo;
	/**
	 * 案场助手退出页logo
	 */
	private String assiantExitLogo;
	/**
	 * 公司id集合
	 */
	private List<Long> ids;
	/**
	 * 申请人姓名
	 */
	private String applyUserName;
	/**
	 * 申请人手机号
	 */
	private String applyUserPhone;
	/**
	 * 渠道PC登录页logo
	 */
	private String developersLoginLogo;
	/**
	 * 渠道PC首页logo
	 */
	private String developersIndexLogo;
	public String getDevelopersLoginLogo() {
		return developersLoginLogo;
	}

	public void setDevelopersLoginLogo(String developersLoginLogo) {
		this.developersLoginLogo = developersLoginLogo;
	}

	public String getDevelopersIndexLogo() {
		return developersIndexLogo;
	}

	public void setDevelopersIndexLogo(String developersIndexLogo) {
		this.developersIndexLogo = developersIndexLogo;
	}

	public String getAgencyLoginLogo() {
		return agencyLoginLogo;
	}

	public void setAgencyLoginLogo(String agencyLoginLogo) {
		this.agencyLoginLogo = agencyLoginLogo;
	}

	public String getAgencyIndexLogo() {
		return agencyIndexLogo;
	}

	public void setAgencyIndexLogo(String agencyIndexLogo) {
		this.agencyIndexLogo = agencyIndexLogo;
	}
	/**
	 * 分销PC登录页logo
	 */
	private String agencyLoginLogo;
	
	/**
	 * 是否开启状态过滤
	 */
	private boolean statusNotFilterFlag;
	/**
	 * 分销PC首页logo
	 */
	private String agencyIndexLogo;
	
	public List<Long> getIds() {
		return ids;
	}

	public void setIds(List<Long> ids) {
		this.ids = ids;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public String getH5LoginLogo() {
		return h5LoginLogo;
	}

	public void setH5LoginLogo(String h5LoginLogo) {
		this.h5LoginLogo = h5LoginLogo;
	}

	public String getAssiantLoginLogo() {
		return assiantLoginLogo;
	}

	public void setAssiantLoginLogo(String assiantLoginLogo) {
		this.assiantLoginLogo = assiantLoginLogo;
	}

	public String getAssiantIndexLogo() {
		return assiantIndexLogo;
	}

	public void setAssiantIndexLogo(String assiantIndexLogo) {
		this.assiantIndexLogo = assiantIndexLogo;
	}

	public String getAssiantExitLogo() {
		return assiantExitLogo;
	}

	public void setAssiantExitLogo(String assiantExitLogo) {
		this.assiantExitLogo = assiantExitLogo;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public String getCommissionWay() {
		return commissionWay;
	}

	public void setCommissionWay(String commissionWay) {
		this.commissionWay = commissionWay;
	}

	public String getCommission() {
		return commission;
	}

	public void setCommission(String commission) {
		this.commission = commission;
	}

	public String getReward() {
		return reward;
	}

	public void setReward(String reward) {
		this.reward = reward;
	}

	public String getPremisesCommission() {
		return premisesCommission;
	}

	public void setPremisesCommission(String premisesCommission) {
		this.premisesCommission = premisesCommission;
	}

	public List<String> getStaffCompanyNames() {
		return staffCompanyNames;
	}

	public void setStaffCompanyNames(List<String> staffCompanyNames) {
		this.staffCompanyNames = staffCompanyNames;
	}

	public String getProvinceIds() {
		return provinceIds;
	}

	public void setProvinceIds(String provinceIds) {
		this.provinceIds = provinceIds;
	}

	public String getCityIds() {
		return cityIds;
	}

	public void setCityIds(String cityIds) {
		this.cityIds = cityIds;
	}

	public String getApplyUserName() {
		return applyUserName;
	}

	public void setApplyUserName(String applyUserName) {
		this.applyUserName = applyUserName;
	}

	public String getApplyUserPhone() {
		return applyUserPhone;
	}

	public void setApplyUserPhone(String applyUserPhone) {
		this.applyUserPhone = applyUserPhone;
	}

	public List<String> getCompanyUuids() {
		return companyUuids;
	}

	public void setCompanyUuids(List<String> companyUuids) {
		this.companyUuids = companyUuids;
	}

	public boolean getStatusNotFilterFlag() {
		return statusNotFilterFlag;
	}

	public void setStatusNotFilterFlag(boolean statusNotFilterFlag) {
		this.statusNotFilterFlag = statusNotFilterFlag;
	}

	public List<String> getStatusList() {
		return statusList;
	}

	public void setStatusList(List<String> statusList) {
		this.statusList = statusList;
	}
	
}
